# -*- coding: utf-8 -*-
import json ,requests, sys, os
sys.path.append("./")
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
from settings import PRPCRYPTO_KEY
from home_application.models import ApiUser
from home_application.crypto import prpcrypt

requests.packages.urllib3.disable_warnings()
s = ApiUser(app_name='saltstack',api_user='saltapiuser',api_paas='L3OqVjVWuuWVjVq03L',api_url='https://wwww.bvaidu.com:15301')
try:
    s.save(PRPCRYPTO_KEY)
except Exception,e:
    print u"保存失败....{0}".format(e)


